
#define DllExport __declspec(dllexport)

extern "C" {
	DllExport int __stdcall getChkCode(byte * data, int len, char *code, char *mask, char *color, char *frame);
	DllExport void __stdcall getAnswer(LPCSTR prompt, LPCSTR fullCode, LPCSTR fullMask, LPCSTR fullColor, LPCSTR fullFrame, LPSTR result);
	DllExport bool __stdcall addPalMark(WORD markCode, LPCSTR prompt, int width, int height, DWORD*value, bool isMask);
	DllExport bool __stdcall removePalMark(WORD markCode, bool isMask);
	DllExport void __stdcall clearPalMark(bool isMask);
	DllExport void __stdcall resetPalMark(bool isMask);
	DllExport int __stdcall getPalMark(LPVOID buf, int bufCount, bool isMask);
	DllExport bool __stdcall getPalMarkValue(LPVOID buf, WORD markCode, bool isMask);
	DllExport char __stdcall getFreeMarkChar(bool isMask);
	DllExport bool __stdcall learnPalMark(HWND hWnd, byte * data, int len, LPCSTR prompt);
	DllExport void __stdcall startFlash(LPCSTR shareDataName, LPVOID hookedFunc);
	DllExport void __stdcall endFlash();
	DllExport int __stdcall addFlash(HWND hWnd, int x, int y, int w, int h, int scrlX, int scrlY);
	DllExport int __stdcall removeFlash(HWND hWnd);
	DllExport int __stdcall setScroll(HWND hWnd, int scrlX, int scrlY);
	DllExport int __stdcall rectCatched(HWND hWnd, int x, int y, int w, int h);
	DllExport HBITMAP __stdcall getCatchBmp(HWND hWnd, int x, int y, int w, int h);
	DllExport int __stdcall PicHash(LPCVOID data, int dataLength, int blockSize, LPCVOID hash, int hashLength);
	DllExport bool __stdcall HashCompare(LPCVOID hash1, int hash1Length, LPCVOID hash2, int hash2Length, int minRate/*1-100*/);
};

typedef struct _ST_HSV ST_HSV;
void RGB2HSV(const RGBQUAD * pRGB, ST_HSV * pHSV);
int LABl(int r, int g, int b);
LPCWSTR LPSTRToWide(const char * src, int srcLen, UINT codePage, int *pDestLen);
